package com.retail.member.client.impl;

import com.retail.core.entity.result.Result;
import com.retail.help.entity.vo.RetailHelpVo;
import com.retail.help.service.RetailHelpService;
import com.retail.member.client.HelpClient;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class HelpClientImpl implements HelpClient {

    @Autowired
    private RetailHelpService retailHelpService;

    @Override
    public Result<RetailHelpVo> getHelp(Long id) {
        RetailHelpVo retailHelpVo = retailHelpService.getModel(id);
        return Result.success(retailHelpVo);
    }

    @Override
    public Result<List<RetailHelpVo>> findHelps() {
        List<RetailHelpVo> list = retailHelpService.findHelps();
        return Result.success(list);
    }
}
